package com.lanju.entity;

import java.io.Serializable;

/** 请求报文实体类
 * @Author zengqd
 * @ClassName MsgBody
 * @Date 2019/10/21 19:37
 * @Version v1.0
 **/
public class MsgBody implements Serializable {

    private static final long serialVersionUID = -1600219019264329257L;

    private String rtRequest;

    private String rtHead;

    private String accessID;

    private String accessSEQ;

    private String accessPwd;

    private String accessPlatformID;

    private String operatorType;

    private String operatorID;

    private String version;

    private String json;

    public String getRtRequest() {
        return rtRequest;
    }

    public String getRtHead() {
        return rtHead;
    }

    public String getAccessID() {
        return accessID;
    }

    public String getAccessSEQ() {
        return accessSEQ;
    }

    public String getAccessPwd() {
        return accessPwd;
    }

    public String getAccessPlatformID() {
        return accessPlatformID;
    }

    public String getOperatorType() {
        return operatorType;
    }

    public String getOperatorID() {
        return operatorID;
    }

    public String getVersion() {
        return version;
    }

    public String getJson() {
        return json;
    }

    public void setRtRequest(String rtRequest) {
        this.rtRequest = rtRequest;
    }

    public void setRtHead(String rtHead) {
        this.rtHead = rtHead;
    }

    public void setAccessID(String accessID) {
        this.accessID = accessID;
    }

    public void setAccessSEQ(String accessSEQ) {
        this.accessSEQ = accessSEQ;
    }

    public void setAccessPwd(String accessPwd) {
        this.accessPwd = accessPwd;
    }

    public void setAccessPlatformID(String accessPlatformID) {
        this.accessPlatformID = accessPlatformID;
    }

    public void setOperatorType(String operatorType) {
        this.operatorType = operatorType;
    }

    public void setOperatorID(String operatorID) {
        this.operatorID = operatorID;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public void setJson(String json) {
        this.json = json;
    }

    @Override
    public String toString() {
        return "MsgBody{" +
                "rtRequest='" + rtRequest + '\'' +
                ", rtHead='" + rtHead + '\'' +
                ", accessID='" + accessID + '\'' +
                ", accessSEQ='" + accessSEQ + '\'' +
                ", accessPwd='" + accessPwd + '\'' +
                ", accessPlatformID='" + accessPlatformID + '\'' +
                ", operatorType='" + operatorType + '\'' +
                ", operatorID='" + operatorID + '\'' +
                ", version='" + version + '\'' +
                ", json='" + json + '\'' +
                '}';
    }

    /**
     * 生成请求报文字符串
     * @return
     */
    public String createBody() {
        return "<rtRequest>" +
                "<rtHead>"   +
                " <accessID>" + accessID + "</accessID>"+
                " <accessSEQ>" + accessSEQ + "</accessSEQ>"+
                " <accessPwd>" + accessPwd + "</accessPwd>"+
                " <accessPlatformID>" + accessPlatformID + "</accessPlatformID>"+
                "<operatorType>" + operatorType + "</operatorType>"+
                "<operatorID>" + operatorID + "</operatorID>"+
                "<version>" + version + "</version></rtHead>"+
                "<json>" + json + "</json>"+
                "</rtRequest>";
    }
}
